/* eslint-disable no-unused-vars */
import moment from 'moment';

let weekFunc = {
    getMonthViewStartDate (date, firstDay) {
      firstDay = parseInt(firstDay);
      let start = moment(date);
      start.subtract(start.day(), 'days');
  
      if (start.day() < firstDay) {
        start.subtract(0, 'days');
      }
  
      // start.add(firstDay, 'days');
  
      return start;
    },
    getMonthViewEndDate (date) {
      return this.getMonthViewStartDate().add(6, 'weeks');
    }
  };
  export default weekFunc;